<%--
  Created by IntelliJ IDEA.
  User: dzw
  Date: 2017/11/30
  Time: 17:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
  String _id=request.getParameter("_");
%>
<div class="jqGrid_wrapper">
  <table id="dialog_customerInfo_table"></table>
  <div id="dialog_customerInfo_page"></div>
</div>

<script>

  $(function(){

    // 加载数据
    init_grid_dialog_customerInfo();

  });

  // 初始化表单数据
  function init_grid_dialog_customerInfo() {

    __init_jqgrid('dialog_customerInfo_table', 'dialog_customerInfo_page',
            '<%=path%>/com/customerInfo/list',
            ["客户姓名","客户类别","所在区域","id"],
            [
              {name:'name',index:'name',sortable:true,search:true,width:120, searchoptions: {sopt: ['cn']}},
              {name:'customerType',index:'customerType',search:false,hidden:true},
              {name:'area',index:'area',search:false,hidden:true},
              {name:'id',index:'id',search:false,hidden:true},
            ],
            true,
            {
              autowidth: false,
              width: 538
            }
    );

  }

  function fn_dialog_customerInfo_select(callback) {
    var rowId = $('#dialog_customerInfo_table').jqGrid('getGridParam', 'selrow');
    if (rowId) {
      callback($('#dialog_customerInfo_table').jqGrid('getRowData', rowId));
    } else {
      callback();
    }
  }

</script>